package 装饰模式.Decorates;

/**
 * 文 件 名 称：DecoratesFactory.
 * 文 件 说 明：
 * 创   建   人：zpen.
 * 创 建 时 间：2018/5/8 11:25.
 */
public class DecoratesFactory {
    Decorate decorate = null;
    public Decorate getDecorate(String type){
        switch (type){
            case "fl":
                decorate = new FloorDecorate();
                break;
            case "wa":
                decorate = new WallDecorate();
                break;
        }
        return decorate;
    }
}
